package com.dsz.usercenter.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.dsz.usercenter.model.domain.Team;
import com.dsz.usercenter.model.domain.User;
import com.dsz.usercenter.model.request.*;
import com.dsz.usercenter.model.vo.TeamUserVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author 23826
 * @description 针对表【team(队伍)】的数据库操作Service
 * @createDate 2024-02-24 22:49:14
 */
public interface TeamService extends IService<Team> {

    boolean joinTeam(TeamJoinRequest teamJoinRequest, User currentUser);

    long saveTeam(TeamAddRequest teamAddRequest, HttpServletRequest request);

    boolean removeTeamById(Long teamId, User currentUser);

    boolean updateTeam(TeamUpdateRequest teamUpdateRequest, User currentUser);

    Team getTeamById(Long teamId);

    List<TeamUserVO> listTeam(TeamQueryRequest teamQueryRequest, boolean isAdmin);

    List<Team> pageTeam(TeamQueryRequest teamQueryRequest);

    boolean quitTeam(TeamQuitRequest teamQuitRequest, User currentUser);

    List<TeamUserVO> listJoinTeam(TeamQueryRequest teamQueryRequest, User currentUser);
}
